<div id="categorys">
    <div class="dt" id="category_handle"><a href="./gallery-0-1.html" target="_blank">全部商品分类<i class="ci-right"><s>◇</s></i></a></div>
    <div class="dd" id="category_box"<{if $data.page != "index" && $tmpl_type != "index"}> style="display:none"<{/if}>>
    <div class="dd-inner">
     <{assign var="do" value=1}>
      <{foreach from=$data.data item=item key=key name=lv1}>    
      <div class="item fore<{$do}>" data-index="<{$do}>">
        <h3><em class="gt-cat"></em><{if !$item.morelink}><a href="<{$item.url}>"<{if $setting.target_blank}> target="_blank"<{/if}>><{$item.cat_name}></a><{else}><{$item.morelink}><{/if}></h3>
        <i>&gt;</i>
       
       </div>
       <{assign var="do" value=$do+1}>
       <{/foreach}>
       <{foreach from=$data.custom item=item key=key}>    
          <div class="item fore<{$do}>" data-index="<{$do}>">
            <h3><a href="<{$item.url}>"<{if $setting.target_blank}> target="_blank"<{/if}>><{$item.cat_name}></a></h3>
            <i>&gt;</i>
           </div>
           <{assign var="do" value=$do+1}>
        <{/foreach}>
    </div>
    <div class="dorpdown-layer">
     <{assign var="dr" value=1}>
      <{foreach from=$data.data item=item key=key name=drop}>
      <div id="category-item-<{$dr}>" class="item-sub">
      	<{if count($item.brand) >0 && $setting.showrand != "off"}>
        <div class="item-brands">
          <div class="brands-inner">
           <{foreach from=$item.brand item=brand key=key name=blist}>
           <{if $smarty.foreach.blist.iteration <= $setting.maxbrands}>
           <a class="img-link" href="<{link app=b2c ctl=site_brand arg0=$brand}>"<{if $setting.target_blank}> target="_blank"<{/if}>><img width="<{$setting.brand_width}>" height="<{$setting.brand_height}>" src="<{$data.brand_list[$brand].brand_logo|storager}>" alt="<{$data.brand_list[$brand].brand_name}>" /></a>
           <{/if}>
          <{/foreach}>
          </div>
        </div>
        <{/if}>
        
        <{if $setting.showsales && count($item.sales) >0}>
        <div class="item-channels">
          <div class="channels">
          	<{foreach from=$item.sales item=sales key=key nname=slist}>
            <{if $smarty.foreach.slist.iteration <= $setting.maxsales}>
          	<a href="javascript:void(0);" rel="nofollow"><{$sales.name}><i>&gt;</i></a>
            <{/if}>
            <{/foreach}>
         </div>
        </div>
        <{/if}>
        
       <{if count($item.lv2) > 0}>
        <div class="subitems">
            <{assign var="dr2" value=1}>
            <{foreach from=$item.lv2 item=lv2 key=key}>
            <dl class="fore<{$dr2++}>">
            <dt><a href="<{$lv2.url}>"<{if $setting.target_blank}> target="_blank"<{/if}>><{$lv2.cat_name}></a></dt>
            <dd>
            	<{foreach from=$lv2.lv3 item=lv3 key=key name=lv3}><a href="<{$lv2.url}>"<{if $setting.target_blank}> target="_blank"<{/if}>><{$lv3.cat_name}></a><{/foreach}>
                </dd>
            </dl>
            <{/foreach}>          
        </div>
        <{/if}>
                
       
      </div>      
     <{assign var="dr" value=$dr+1}>
    <{/foreach}>   
    </div>
    </div>
</div>
<!--script src="images/qfcatshow.js"></script-->
<script>
var category = $('category_box');
<{if $data.page != "index" && $tmpl_type != "index"}>
$('categorys').addEvents({
    'mouseenter': function(e){
		this.addClass('hover');
        category.show();
    },
    'mouseleave': function(e){
		this.removeClass('hover');
        category.hide();
    }
});
<{/if}>
var cateshow = new QF.qfcatShow({
	'container':'categorys',//主容器
	'menuItem':'.item',//菜单项的CSS名称
	'subContainer': '.dorpdown-layer',//子菜单容器的css名称，如果是用的ID，可以填（#id）
	'subMenuPrefix':'category-item-'//子菜单项ID前缀
});
cateshow.addEvents({
	'over':function(item){
		item.addClass('hover');
	},
	'leave':function(item){
		item.removeClass('hover');
	}
});
</script>